package 建造者模式;

/**
 * 客户端
 */
public class Client {

    public static void main(String[] args) {
        TxtBuilder txtBuilder = new TxtBuilder();
        XmlBuilder xmlBuilder = new XmlBuilder();
        Product p1 = txtBuilder.writeHead("txt文件头").writeBody("txt文件体").writeTail("JYuXuAN").outFile().getProduct();
        Product p2 = xmlBuilder.writeHead("xml文件头").writeBody("xml文件体").writeTail("jyuxuan").outFile().getProduct();
        System.out.println(p1);
        System.out.println(p2);
    }

}
